//k个不同的小于n的随机数
package main

import (
	"fmt"
	"math/rand"
	//"time"
)

const (
	n = 1000
	k = 100
)

func main() {
	var data [k]int
	//count := n / k
	for i, j, z := 0, n/k, 0; z < k; j += n / k {
		data[z] = rand.Intn(j-i) + i
		i = j
		z++
	}
	fmt.Println(data)
	for i, j := 0, k; i < k; i++ {
		j = rand.Intn(k)
		data[i], data[j] = data[j], data[i]
	}
	fmt.Println(data)
}
